package sv.gob.mh.dgii.model;

// Generated Dec 12, 2007 1:25:05 PM by Hibernate Tools 3.2.0.CR1

import java.util.Date;
import javax.persistence.AttributeOverride;
import javax.persistence.AttributeOverrides;
import javax.persistence.Column;
import javax.persistence.EmbeddedId;
import javax.persistence.Entity;
import javax.persistence.FetchType;
import javax.persistence.JoinColumn;
import javax.persistence.ManyToOne;
import javax.persistence.Table;
import javax.persistence.Temporal;
import javax.persistence.TemporalType;

/**
 * CgEstAvanDet generated by hbm2java
 */
@Entity
@Table(name = "CG_EST_AVAN_DET", schema = "UPET")
public class CgEstAvanDet implements java.io.Serializable {

	/**
	 * 
	 */
	private static final long serialVersionUID = 8510700814752280465L;
	private CgEstAvanDetId id;
	private CgEstAvan cgEstAvan;
	private CgActividad cgActividad;
	private Integer nhoras;
	private Integer bstatus;
	private String sobservacion;
	private String cusuario;
	private Date fhingreso;
	private Date fhmodificacion;
	private Integer nhorasSup;

	public CgEstAvanDet() {
	}

	public CgEstAvanDet(CgEstAvanDetId id, CgEstAvan cgEstAvan,
			CgActividad cgActividad, Integer nhoras, Integer bstatus,
			String cusuario, Date fhingreso, Date fhmodificacion) {
		this.id = id;
		this.cgEstAvan = cgEstAvan;
		this.cgActividad = cgActividad;
		this.nhoras = nhoras;
		this.bstatus = bstatus;
		this.cusuario = cusuario;
		this.fhingreso = fhingreso;
		this.fhmodificacion = fhmodificacion;
	}

	public CgEstAvanDet(CgEstAvanDetId id, CgEstAvan cgEstAvan,
			CgActividad cgActividad, Integer nhoras, Integer bstatus,
			String sobservacion, String cusuario, Date fhingreso,
			Date fhmodificacion, Integer nhorasSup) {
		this.id = id;
		this.cgEstAvan = cgEstAvan;
		this.cgActividad = cgActividad;
		this.nhoras = nhoras;
		this.bstatus = bstatus;
		this.sobservacion = sobservacion;
		this.cusuario = cusuario;
		this.fhingreso = fhingreso;
		this.fhmodificacion = fhmodificacion;
		this.nhorasSup = nhorasSup;
	}

	@EmbeddedId
	@AttributeOverrides( {
			@AttributeOverride(name = "nestAvance", column = @Column(name = "N_EST_AVANCE", nullable = false, precision = 10, scale = 0)),
			@AttributeOverride(name = "nactividad", column = @Column(name = "N_ACTIVIDAD", nullable = false, precision = 10, scale = 0)) })
	public CgEstAvanDetId getId() {
		return this.id;
	}

	public void setId(CgEstAvanDetId id) {
		this.id = id;
	}

	@ManyToOne(fetch = FetchType.LAZY)
	@JoinColumn(name = "N_EST_AVANCE", nullable = false, insertable = false, updatable = false)
	public CgEstAvan getCgEstAvan() {
		return this.cgEstAvan;
	}

	public void setCgEstAvan(CgEstAvan cgEstAvan) {
		this.cgEstAvan = cgEstAvan;
	}

	@ManyToOne(fetch = FetchType.LAZY)
	@JoinColumn(name = "C_ACTIVIDAD", nullable = false)
	public CgActividad getCgActividad() {
		return this.cgActividad;
	}

	public void setCgActividad(CgActividad cgActividad) {
		this.cgActividad = cgActividad;
	}

	@Column(name = "N_HORAS", nullable = false, precision = 5, scale = 0)
	public Integer getNhoras() {
		return this.nhoras;
	}

	public void setNhoras(Integer nhoras) {
		this.nhoras = nhoras;
	}

	@Column(name = "B_STATUS", nullable = false, precision = 1, scale = 0)
	public Integer getBstatus() {
		return this.bstatus;
	}

	public void setBstatus(Integer bstatus) {
		this.bstatus = bstatus;
	}

	@Column(name = "S_OBSERVACION", length = 200)
	public String getSobservacion() {
		return this.sobservacion;
	}

	public void setSobservacion(String sobservacion) {
		this.sobservacion = sobservacion;
	}

	@Column(name = "C_USUARIO", nullable = false, length = 30)
	public String getCusuario() {
		return this.cusuario;
	}

	public void setCusuario(String cusuario) {
		this.cusuario = cusuario;
	}

	@Temporal(TemporalType.TIMESTAMP)
	@Column(name = "FH_INGRESO", nullable = false, length = 7)
	public Date getFhingreso() {
		return this.fhingreso;
	}

	public void setFhingreso(Date fhingreso) {
		this.fhingreso = fhingreso;
	}

	@Temporal(TemporalType.DATE)
	@Column(name = "FH_MODIFICACION", nullable = false, length = 7)
	public Date getFhmodificacion() {
		return this.fhmodificacion;
	}

	public void setFhmodificacion(Date fhmodificacion) {
		this.fhmodificacion = fhmodificacion;
	}

	@Column(name = "N_HORAS_SUP", precision = 5, scale = 0)
	public Integer getNhorasSup() {
		return this.nhorasSup;
	}

	public void setNhorasSup(Integer nhorasSup) {
		this.nhorasSup = nhorasSup;
	}

}
